//
//  Common.swift
//  SmartMachine
//
//  Created by Sherman's iMac on 2019/11/6.
//  Copyright © 2019 Smart. All rights reserved.
//

import Cocoa

class Common: NSObject {

}


func FUNC_COLOR(r: CGFloat , g : CGFloat , b : CGFloat) -> NSColor {
    
    return NSColor.init(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: 1.0)
}

func FUNC_BORAD(_ storyBoardID: String) -> NSViewController? {
    
    let board = NSStoryboard.init(name: "Smart", bundle: Bundle.main)
    let ctrl = board.instantiateController(withIdentifier: storyBoardID)
    return ctrl as? NSViewController
}
